<template>
  <div>
      <div class="list" >
          <div v-for="v in list" :key="v.id" >
           <div @click="goDetail(v.id)">
              <img :src="v.img" alt="" style="width:100%;height:200px;border-radius:10px">
                
              <div style="font-weight: bold;margin-top:10px">{{v.name}}</div>
              <div>分类:{{v.cname}}</div>
             <div >
                <el-progress :percentage="v.jindu" style="align-items: center;width: 100%;display:flex"></el-progress>
             </div>
           </div>
          </div>
      </div>
  </div>
</template>

<script>
import api from "@/api/index"
  export default {
      data() {
          return {
              cur:1,
              typeList: [],
              curId:null,
              list:[],
              xlList:[],
              title:''
          }
      },
      mounted () {
     this.getList()
    
      },
      methods: {
       
          goDetail(id){
              this.$router.push("/xiangqing?id="+id)
          },
          changeList(id){
              this.cur=id
              this.getList()
          },
           getList(){
          api.getJindu({page:1,size:99,uid:this.$store.state.user.id}).then(res=>{
              this.list=res.data
              console.log(222,res);
          })
      }
      },
     
  }
</script>

<style lang="scss" scoped>
.tabbar{
    
  margin-top:20px;padding-left:20px;
  display:flex;
  font-size: 20px;
  >div{
      margin-right: 20px;
      cursor: pointer;
      &.cur{
          color: #1e90ff;
      }
  }
}
.swiper{
  position: relative;
  span{
      position: absolute;
      top: 20px;
      left: 20px;
      color: white;
      font-size: 22px;
  }
}
.shanchu{
    text-decoration: line-through;
}
.list{
  *{
            box-sizing: border-box !important;
  }
  margin-top: 10px;
  display: flex;flex-wrap: wrap;
  >div{

      padding: 20px;
      width: 25%;
      >div{
          &:hover{
              background-color: #eee;
          }
          cursor: pointer;
          padding: 20px;
          border: 1px solid gray;
          border-radius: 20px;
          >div{
              font-size: 16px;
              line-height: 26px;
              height: 26px;
          }
      }
  }
}
.header{
  display: flex;
  background-color: blue;
  padding: 18px;
  >div{
      cursor: pointer;
      color: white;
      font-size: 15px;
      margin-right: 20px;
      &.cur{
          color: aqua;
      }
  }
}
</style>